3.415 \(\int \frac{\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx\)

Optimal. Leaf size=125 \[ \frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt{b} d}-\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt{b} d} \]

[Out]

-(Sqrt[Sqrt[a] - Sqrt[b]]*ArcTan[(Sqrt[Sqrt[a] - Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*Sqrt[b]*d) + (Sqr
t[Sqrt[a] + Sqrt[b]]*ArcTan[(Sqrt[Sqrt[a] + Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*Sqrt[b]*d)

________________________________________________________________________________________

Rubi [A]  time = 0.109314, antiderivative size = 125, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {3224, 1093, 205} \[ \frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt{b} d}-\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt{b} d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^2/(a - b*Sin[c + d*x]^4),x]

[Out]

-(Sqrt[Sqrt[a] - Sqrt[b]]*ArcTan[(Sqrt[Sqrt[a] - Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*Sqrt[b]*d) + (Sqr
t[Sqrt[a] + Sqrt[b]]*ArcTan[(Sqrt[Sqrt[a] + Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*Sqrt[b]*d)

Rule 3224

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^4)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + 2*a*ff^2*x^2 + (a + b)*ff^4*x^4)^p/(1 + ff^2*x^2)^(m/2 + 2
*p + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 1093

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{a+2 a x^2+(a-b) x^4} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{a-\sqrt{a} \sqrt{b}+(a-b) x^2} \, dx,x,\tan (c+d x)\right )}{2 \sqrt{a} \sqrt{b} d}-\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{a+\sqrt{a} \sqrt{b}+(a-b) x^2} \, dx,x,\tan (c+d x)\right )}{2 \sqrt{a} \sqrt{b} d}\\ &=-\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt{b} d}+\frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt{b} d}\\ \end{align*}

Mathematica [A]  time = 0.281721, size = 158, normalized size = 1.26 \[ \frac{\frac{\left (\sqrt{a} \sqrt{b}+b\right ) \tan ^{-1}\left (\frac{\left (\sqrt{a}+\sqrt{b}\right ) \tan (c+d x)}{\sqrt{\sqrt{a} \sqrt{b}+a}}\right )}{\sqrt{\sqrt{a} \sqrt{b}+a}}+\frac{\left (\sqrt{a} \sqrt{b}-b\right ) \tanh ^{-1}\left (\frac{\left (\sqrt{a}-\sqrt{b}\right ) \tan (c+d x)}{\sqrt{\sqrt{a} \sqrt{b}-a}}\right )}{\sqrt{\sqrt{a} \sqrt{b}-a}}}{2 \sqrt{a} b d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^2/(a - b*Sin[c + d*x]^4),x]

[Out]

(((Sqrt[a]*Sqrt[b] + b)*ArcTan[((Sqrt[a] + Sqrt[b])*Tan[c + d*x])/Sqrt[a + Sqrt[a]*Sqrt[b]]])/Sqrt[a + Sqrt[a]
*Sqrt[b]] + ((Sqrt[a]*Sqrt[b] - b)*ArcTanh[((Sqrt[a] - Sqrt[b])*Tan[c + d*x])/Sqrt[-a + Sqrt[a]*Sqrt[b]]])/Sqr
t[-a + Sqrt[a]*Sqrt[b]])/(2*Sqrt[a]*b*d)

________________________________________________________________________________________

Maple [B]  time = 0.112, size = 226, normalized size = 1.8 \begin{align*} -{\frac{a}{2\,d}\arctan \left ({ \left ( a-b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) \left ( a-b \right ) }}}}+{\frac{a}{2\,d}{\it Artanh} \left ({ \left ( -a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) \left ( a-b \right ) }}}}+{\frac{b}{2\,d}\arctan \left ({ \left ( a-b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) \left ( a-b \right ) }}}}-{\frac{b}{2\,d}{\it Artanh} \left ({ \left ( -a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) \left ( a-b \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x)

[Out]

-1/2/d*a/(a*b)^(1/2)/(((a*b)^(1/2)+a)*(a-b))^(1/2)*arctan((a-b)*tan(d*x+c)/(((a*b)^(1/2)+a)*(a-b))^(1/2))+1/2/
d*a/(a*b)^(1/2)/(((a*b)^(1/2)-a)*(a-b))^(1/2)*arctanh((-a+b)*tan(d*x+c)/(((a*b)^(1/2)-a)*(a-b))^(1/2))+1/2/d*b
/(a*b)^(1/2)/(((a*b)^(1/2)+a)*(a-b))^(1/2)*arctan((a-b)*tan(d*x+c)/(((a*b)^(1/2)+a)*(a-b))^(1/2))-1/2/d*b/(a*b
)^(1/2)/(((a*b)^(1/2)-a)*(a-b))^(1/2)*arctanh((-a+b)*tan(d*x+c)/(((a*b)^(1/2)-a)*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{\cos \left (d x + c\right )^{2}}{b \sin \left (d x + c\right )^{4} - a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x, algorithm="maxima")

[Out]

-integrate(cos(d*x + c)^2/(b*sin(d*x + c)^4 - a), x)

________________________________________________________________________________________

Fricas [B]  time = 2.76512, size = 1277, normalized size = 10.22 \begin{align*} -\frac{1}{8} \, \sqrt{-\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \log \left (\frac{1}{2} \, a d \sqrt{-\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + \frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4} \,{\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt{\frac{1}{a^{3} b d^{4}}} - \frac{1}{4}\right ) + \frac{1}{8} \, \sqrt{-\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \log \left (-\frac{1}{2} \, a d \sqrt{-\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + \frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4} \,{\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt{\frac{1}{a^{3} b d^{4}}} - \frac{1}{4}\right ) + \frac{1}{8} \, \sqrt{\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \log \left (\frac{1}{2} \, a d \sqrt{\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - \frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4} \,{\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt{\frac{1}{a^{3} b d^{4}}} + \frac{1}{4}\right ) - \frac{1}{8} \, \sqrt{\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \log \left (-\frac{1}{2} \, a d \sqrt{\frac{a b d^{2} \sqrt{\frac{1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - \frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4} \,{\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt{\frac{1}{a^{3} b d^{4}}} + \frac{1}{4}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x, algorithm="fricas")

[Out]

-1/8*sqrt(-(a*b*d^2*sqrt(1/(a^3*b*d^4)) + 1)/(a*b*d^2))*log(1/2*a*d*sqrt(-(a*b*d^2*sqrt(1/(a^3*b*d^4)) + 1)/(a
*b*d^2))*cos(d*x + c)*sin(d*x + c) + 1/4*cos(d*x + c)^2 + 1/4*(2*a^2*d^2*cos(d*x + c)^2 - a^2*d^2)*sqrt(1/(a^3
*b*d^4)) - 1/4) + 1/8*sqrt(-(a*b*d^2*sqrt(1/(a^3*b*d^4)) + 1)/(a*b*d^2))*log(-1/2*a*d*sqrt(-(a*b*d^2*sqrt(1/(a
^3*b*d^4)) + 1)/(a*b*d^2))*cos(d*x + c)*sin(d*x + c) + 1/4*cos(d*x + c)^2 + 1/4*(2*a^2*d^2*cos(d*x + c)^2 - a^
2*d^2)*sqrt(1/(a^3*b*d^4)) - 1/4) + 1/8*sqrt((a*b*d^2*sqrt(1/(a^3*b*d^4)) - 1)/(a*b*d^2))*log(1/2*a*d*sqrt((a*
b*d^2*sqrt(1/(a^3*b*d^4)) - 1)/(a*b*d^2))*cos(d*x + c)*sin(d*x + c) - 1/4*cos(d*x + c)^2 + 1/4*(2*a^2*d^2*cos(
d*x + c)^2 - a^2*d^2)*sqrt(1/(a^3*b*d^4)) + 1/4) - 1/8*sqrt((a*b*d^2*sqrt(1/(a^3*b*d^4)) - 1)/(a*b*d^2))*log(-
1/2*a*d*sqrt((a*b*d^2*sqrt(1/(a^3*b*d^4)) - 1)/(a*b*d^2))*cos(d*x + c)*sin(d*x + c) - 1/4*cos(d*x + c)^2 + 1/4
*(2*a^2*d^2*cos(d*x + c)^2 - a^2*d^2)*sqrt(1/(a^3*b*d^4)) + 1/4)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2/(a-b*sin(d*x+c)**4),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError